//
//  YDYHomeTableViewCell.m
//  DY_Weibo3
//
//  Created by 杨德勇 on 2016/8/22.
//  Copyright © 2016年 杨德勇. All rights reserved.
//

#import "YDYHomeTableViewCell.h"
#import <UIImageView+WebCache.h>
@interface YDYHomeTableViewCell()
//用户头像
@property (weak, nonatomic) IBOutlet UIImageView *userIconImgView;
//头像右下侧的认证
@property (weak, nonatomic) IBOutlet UIImageView *iconVIPImgView;
//用户名
@property (weak, nonatomic) IBOutlet UILabel *screen_nameLabel;
//时间
@property (weak, nonatomic) IBOutlet UILabel *timeLabel;
//名字右边的VIP
@property (weak, nonatomic) IBOutlet UIImageView *VIPImgView;
//微博文字内容
@property (weak, nonatomic) IBOutlet UILabel *contentTextLabel;
//来源
@property (weak, nonatomic) IBOutlet UILabel *sourceLabel;


@end

@implementation YDYHomeTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    
}
-(void)setStatus:(YDYStatusViewModel *)status{
    _status = status;
    
    [self.userIconImgView sd_setImageWithURL:[NSURL URLWithString:status.user.profile_image_url]];
    self.userIconImgView.layer.cornerRadius = 30;
    self.userIconImgView.layer.masksToBounds = YES;
    
    //vip
    
    //
    self.screen_nameLabel.text = status.user.screen_name;
    [self.screen_nameLabel sizeToFit];

        
    self.timeLabel.text = self.status.created_at;
    [self.timeLabel sizeToFit];
    
    self.contentTextLabel.text = status.text;
    [self.contentTextLabel sizeToFit];
 
    self.sourceLabel.text = self.status.source;
    
}

@end
